<template>
	<view>
		<!--service/result/result.wxml-->
		<view class="result">
		  <image class="icon" src="/static/service/success.png"></image>
		  <block v-if="type == 4">
		    <view class="z-font-40 z-margin-t-40">支付成功</view>
		  <view class="z-fong-28 text_999 z-margin-t-8">您已经完成充值</view>
		  <view class="z-btn" @tap="back">查看钱包</view>
		  <view class="back text_999 z-margin-t-60 z-flex" @tap="home">返回首页</view>
		  </block>
		  <block wx:else>
		    <view class="z-font-40 z-margin-t-40">支付成功</view>
		  <view class="z-fong-28 text_999 z-margin-t-8">您已经完成支付</view>
		  <view class="z-btn" @tap="order">查看订单</view>
		  <view class="back text_999 z-margin-t-40 z-flex" @tap="home">返回首页</view>
		  </block>
		  
		  
		</view>
		

	</view>
</template>

<script>
	import util from "../../utils/util"
	export default {
		data() {
			return {
				show: true,
				    type: 1
			}
		},
		 onLoad (options) {
		    this.type = options.type || 1
		  },
		methods: {
			back(){
			    this.util.back()
			  },
			  home(){
			    uni.switchTab({
			      url: '/pages/index/index'
			    })
			  },
			  order(){
			    if(this.type == 1){
			      uni.redirectTo({
			        url: '/service/myorder/myorder?type=1&active=2'
			      })
			    }else {
			      this.util.back()
			    }
			
			  },
		}
	}
</script>

<style>
/* service/result/result.wxss */
.result{
  height: 100vh;
  display: flex;
  align-items: center;
  flex-direction: column;
  background: #fff;
  box-sizing: border-box;
  padding-top: 200rpx;
}
.icon{
  width: 114rpx;
  height: 114rpx;
}

.result  .z-btn{
  width: 440rpx;
  height: 98rpx;
  margin-top: 160rpx;
  box-sizing: border-box;
}
.back{
  width: 440rpx;
  height: 98rpx;
  box-sizing: border-box;
  border: 1px solid #EDEEF1;
}


</style>
